package com.sharding.jdbc.mybatis.configuration;

import com.sharding.jdbc.mybatis.enums.ModelType;
import com.sharding.jdbc.mybatis.enums.Module;
import com.sharding.jdbc.mybatis.util.IdWorker;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class InitConfig {

    @Bean(name = "testIdGenerator")
    public IdWorker getTestIdWorker() {
        return new IdWorker(ModelType.TEST.val, Module.NORMAL.val);
    }

    @Bean(name = "otherIdGenerator")
    public IdWorker getOtherIdWorker() {
        return new IdWorker(ModelType.TEST.val, Module.OTHER.val);
    }


}
